package com.wavehi.login.controller;

import com.wavehi.login.common.AjaxResult;
import com.wavehi.login.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author WaveHi
 * @Date 30/11/2021 下午 3:53
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 */
@RestController
@RequestMapping("/user")
public class UserInfoDataController {

    @Autowired
    private UserInfoService userInfoService;

    @RequestMapping("/register")
    public AjaxResult<String> register(String name, String password, String phone, String rpassword) {
        //Judge data
        //Correct data
        //Register
        userInfoService.register(name, password, phone, rpassword);
        return AjaxResult.success("Wow!");
    }

}
